package com.cykj.eurekaclient.service;

import com.cykj.eurekaclient.bean.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface BusService {

    int selectAllBus(String cityid,String licensePlate,String maintainer,long state);

    List<Bus> selectBusList(RowBounds rowBounds,String cityid,String licensePlate,String maintainer,long state);



    int selectCity(String cityname);

    int selectFettle(String maintainer);


    boolean addBus(int cityid, int fettleId, String registrationTime, String licensePlate);



    int SelectBusState(String busState);

    boolean updateBus(int fettlerId, int state, String licensePlate,long id);

    boolean delBus(long id);

    boolean stopBus(long id,int busState);

    int selectMaintainNum(String cityId,String licensePlate);

    List<Bus> selectMaintaining(String cityId);

    List<Bus> selectAllMaintain(RowBounds rowBounds, String cityId,String licensePlate);

    List<RouteInfo> selectClasses();

    List<RouteTimeNode> getBeginJourney(String routeName);

    boolean addCarArrange(String beginTime,long routeId, long busId);

    List<StationInfo> getBusRoute(String routeName);

    long getBusRouteId(String routeName);

    boolean carReArrange(long id, long busId);

    List<StationInfo> selStationName(String searchInfo);

    List<String> selRouteName(String routeName);

    List<StationInfo> getStationListMY(String district);

    // 用起点和终点的站点判断查到相关线路,乘车方案
    List<RouteInfo> getRideScheme(String startStationName,String endStationName);

    // 用站点查到包含此站点的所有线路
    List<RouteInfo> stationInRouteAll(@Param(value = "startStationName") String startStationName);

    // 用站点的名字查到经纬度
    StationInfo useNameGetStationInfo(@Param(value = "stationName") String stationName);

    // 用户上车的起点和下车点的站点所处的线路排序位置来截取某条线路中的一段站点(正方向)
    List<StationInfo> interceptStation(@Param(value = "routeName") String routeName,@Param(value = "upStationSequence") long upStationSequence,@Param(value = "stopStationSequence") long stopStationSequence);

    // 用户上车的起点和下车点的站点所处的线路排序位置来截取某条线路中的一段站点（反方向）
    List<StationInfo> backInterceptStation(@Param(value = "routeName") String routeName,@Param(value = "stopStationSequence") long stopStationSequence,@Param(value = "upStationSequence") long upStationSequence);

}
